import { axios } from '@/utils/request'

export function getNurse (id, department) {
  return axios({
    url: 'nurse',
    method: 'get',
    params: {
      'id': id,
      'department': department
    }
  })
}
export function getNurseByDepartment (department) {
  return axios({
    url: '/nurse/department',
    method: 'get',
    params: {
      'department': department
    }
  })
}
export function entryNurse (nurse) {
  return axios({
    url: '/nurse/entry',
    method: 'post',
    data: nurse
  })
}

export function addNurse (nurse) {
  console.log('ss' + nurse)
  return axios({
    url: '/nurse/add',
    method: 'post',
    data: nurse
  })
}
export function delNurse (id) {
  return axios({
    url: '/nurse/del',
    method: 'delete',
    params: {
      'id': id
    }
  })
}

export function updateNurse (nurse) {
  return axios({
    url: 'nurse/update',
    method: 'put',
    data: nurse
  })
}

export function getByName (name) {
  return axios({
    url: '/nurse/query',
    method: 'get',
    params: {
      'name': name
    }
  })
}
export function getEntry () {
  return axios({
    url: '/nurse/entry/get',
    method: 'get'
  })
}

export function updateScheduling (scheduling) {
  return axios({
    url: '/scheduling',
    method: 'post',
    data: scheduling
  })
}
